The latest mockups contain a button to clear all sections at once.
As some elements cannot be cleared, we need to provide that information
to avoid offering an action that has no effect.
https://bugzilla.gnome.org/show_bug.cgi?id=775763
this._messages = new Map();
this._date = new Date();
this.empty = true;
+ this.canClear = false;
this._sync();
},
if (changed)
this.emit('empty-changed');
- this._closeButton.visible = this._canClear();
+ let canClear = this._canClear();
+ changed = this.canClear !== canClear;
+ this.canClear = canClear;
+
+ if (changed)
+ this.emit('can-clear-changed');
+
+ this._closeButton.visible = this.canClear;
this.actor.visible = this.allowed && this._shouldShow();
}
});